<!--餐厅商户订单记录-->
<div class="search">
  日期:
  <nz-date-picker nzFormat="yyyy-MM-dd" [(ngModel)]="sdate" nzPlaceHolder="开始日期">
  </nz-date-picker>
  ~
  <nz-date-picker nzFormat="yyyy-MM-dd" [(ngModel)]="edate" nzPlaceHolder="结束日期">
  </nz-date-picker>
  <a (click)="searchData()">查询</a>
</div>

<nz-table #ajaxTable nzShowSizeChanger [nzFrontPagination]="false" [nzData]="dataSet" [nzLoading]="loading" [nzTotal]="total"
  [nzShowTotal]="totalTemplate" [(nzPageIndex)]="pageIndex" [(nzPageSize)]="pageSize" (nzPageIndexChange)="searchData()"
  (nzPageSizeChange)="searchData(true)" [nzScroll]="{ x:'1300px',y: '400px' }"  [nzFooter]="footerTemplate">
  <thead>
    <tr>
      <th nzWidth="60px" nzLeft="0px">序号</th>
      <th nzWidth="150px">用户昵称</th>
      <th nzWidth="150px">商户名称</th>
      <th nzWidth="150px">订单号</th>
      <th nzWidth="100px">消费金额</th>
      <!-- <th nzWidth="80px">账户余额</th> -->
      <th nzWidth="100px">消费酒水</th>
      <th nzWidth="100px">剩余库存</th>
      <th nzWidth="100px">入账餐费</th>
      <th nzWidth="100px">入账餐币</th>
      <!-- <th nzWidth="150px">平台佣金比例(%)</th>
      <th nzWidth="80px">平台抽取佣金</th>
      <th nzWidth="150px">品牌大使奖金比例(%)</th>
      <th nzWidth="80px">品牌大使获得奖金</th> -->
      <th nzWidth="160px">订单时间</th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let data of ajaxTable.data;index as i">
      <td nzLeft="0px">{{i+1}}</td>
      <td>{{data.nickname}}</td>
      <td>{{data.mername}}</td>
      <td>{{data.ordercode}}</td>
      <td>{{data.money}}</td>
      <!-- <td>{{data.balance}}</td> -->
      <td>{{data.coninscount}}</td>
      <td>{{data.coinbalance}}</td>
      <td>{{data.addmoney}}</td>
      <td>{{data.mealbalance}}</td>
      <!-- <td>{{data.rate+"%"}}</td>
      <td>{{data.ratemoney}}</td>
      <td>{{data.agentrate+"‰"}}</td>
      <td>{{data.agentreward}}</td> -->
      <td>{{data.updateTime | date:"yyyy-MM-dd HH:mm:ss"}}</td>
    </tr>
  </tbody>
</nz-table>

<ng-template #footerTemplate let-footer>
  {{footTotal}}
</ng-template>
<ng-template #totalTemplate let-total>
  共 {{total}} 条
</ng-template>